Range

Function

This API is used to get parameter range for Storage > Disk page.

Note:

The Range provides reference information for client UI input limits and API request limits. When sending Get and Set requests, the parameters must be strictly limited according to the Range, otherwise the request may be rejected by the device.

Request Message

None.

Sample:

POST /API/StorageConfig/Disk/Range HTTP/1.1
{
    "version": "1.0",
    "data": {}
}

Response Message

Parameter Description

Table 1

ParameterRangeTypeDescription
disk_infoJSON arrayDisk Info object, see Table 2 for detailed information
over_writeOff
Auto
1Day
3Days
7Days
14Days
30Days
90Days
stringDisk replication type
esata_recordboolE-SATA recording function switch
support_formatboolUsed to display the formatting button
default_timeout1~120000 unit: msintSession timeout field
hdd_format_typeAllHddData
OnlyHddRecord
OnlyHddData
stringHard disk format type
/* Format the entire hard disk /
/
Format only the video partition /
/
Format only the general partition*/

Table 2

Disk Info Object

ParameterRangeTypeDescription
idintDisk serial number
display_idintDisk display serial number (dedicated to NVR and DVR)
modelMax length: 40 bytestringDisk model
serial_noMax length: 20 bytestringdisk serial number
firmwareMax length: 8 bytestringDisk firmware model
device_typeNone
Normal
Esata
Sd
Usb
Network
Raid
All
stringdisk type
activeInactive
Active
stringDisk working status
statusNoHdd
Unformat
Normal
Full
ReadOnly
HddError
Connecting
Offline
Occupied
Oversized
Broken
Degrade
Rebuilding
Backup
RaidHdd
stringDisk status
total_sizeUnit: MegabytesintTotal capacity
free_sizeUnit: Megabytesintremaining capacity
total_timeUnit: secondsinttotal time
free_timeUnit: secondsintremaining time
format_enableboolCan I format it
delete_enableboolCan I delete it
disk_typeReadAndWriteDisk
RedundantDisk
ReadOnlyDisk
stringDisk group type
disk_group_idintDisk group serial number
NasMaxCountintMaximum number of supported NAS disks
nas_infoJson ObjectNas Info Object, see Table 3 for detailed information

Note: Except for disk in Table 2 Type, disk_ Group_ ID, NasMaxCount, nas_ Other fields of info are only allowed to be obtained and do not support setting

Table 3

Channel Object

ParameterRangeTypeDescription
Enableintenabled
IndexintNetwork disk serial number
TypeNFS
SMB/CIFS
stringProtocol(NFS SMB/CIFS)
Usernamestringusername
Passwordstringpassword
password_emptyboolDo you have a password
IpstringIP
Dirstringdirectory path
SizeIntHard disk capacity (GB)
TotalSize1~8192intTotal size
base_enc_passwordJson ObjectPlease refer to the table in the Syntax file under the Request pubkey or randbyte in the Login directory for encryption password details

Tips:

The response message of the Range request may not contain all the fields in the above table, and the fields not included indicate that the device does not support this parameter configuration.

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {
        "disk_info": {
            "type": "array",
            "min_size": 0,
            "max_size": 18,
            "items": [
                {
                    "id": {
                        "type": "int32",
                        "min": 1,
                        "max": 21
                    },
                    "display_id": {
                        "type": "int32",
                        "min": 1,
                        "max": 21
                    },
                    "model": {
                        "type": "string",
                        "min_len": 0,
                        "max_len": 40
                    },
                    "serial_no": {
                        "type": "string",
                        "min_len": 0,
                        "max_len": 20
                    },
                    "firmware": {
                        "type": "string",
                        "min_len": 0,
                        "max_len": 8
                    },
                    "device_type": {
                        "type": "string",
                        "items": [
                            "None",
                            "Normal",
                            "Esata",
                            "Sd",
                            "Usb",
                            "Network",
                            "Raid",
                            "All"
                        ]
                    },
                    "status": {
                        "type": "string",
                        "items": [
                            "NoHdd",
                            "Unformat",
                            "Normal",
                            "Full",
                            "ReadOnly",
                            "HddError",
                            "Connecting",
                            "Offline",
                            "Occupied",
                            "Oversized",
                            "Broken",
                            "Degrade",
                            "Rebuilding",
                            "Backup",
                            "RaidHdd"
                        ]
                    },
                    "total_size": {
                        "type": "int32",
                        "unit": "MB",
                        "min": 0,
                        "max": 2147483647
                    },
                    "free_size": {
                        "type": "int32",
                        "unit": "MB",
                        "min": 0,
                        "max": 2147483647
                    },
                    "total_time": {
                        "type": "int32",
                        "unit": "second",
                        "min": 0,
                        "max": 2147483647
                    },
                    "free_time": {
                        "type": "int32",
                        "unit": "second",
                        "min": 0,
                        "max": 2147483647
                    },
                    "format_enable": {
                        "type": "bool"
                    },
                    "delete_enable": {
                        "type": "bool"
                    },
                    "disk_type": {
                        "type": "string",
                        "items": [
                            "ReadAndWriteDisk",
                            "RedundantDisk",
                            "ReadOnlyDisk"
                        ]
                    },
                    "nas_info": {
                        "type": "array",
                        "min_size": 0,
                        "max_size": 8,
                        "items": [
                            {
                                "Enable": {
                                    "type": "int32",
                                    "min": 0,
                                    "max": 1
                                },
                                "Index": {
                                    "type": "int32",
                                    "min": 0,
                                    "max": 7
                                },
                                "Type": {
                                    "type": "string",
                                    "items": [
                                        "NFS",
                                        "SMB/CIFS"
                                    ]
                                },
                                "Username": {
                                    "type": "string",
                                    "min_len": 1,
                                    "max_len": 63
                                },
                                "Password": {
                                    "type": "string",
                                    "min_len": 1,
                                    "max_len": 63
                                },
                                "password_empty": {
                                    "type": "bool"
                                },
                                "Ip": {
                                    "type": "string",
                                    "min_len": 1,
                                    "max_len": 15
                                },
                                "Dir": {
                                    "type": "string",
                                    "min_len": 1,
                                    "max_len": 32
                                },
                                "Size": {
                                    "type": "int32",
                                    "unit": "GB",
                                    "min": 33,
                                    "max": 8192
                                },
                                "TotalSize": {
                                    "type": "int32",
                                    "unit": "GB",
                                    "min": 33,
                                    "max": 8192
                                }
                            }
                        ]
                    }
                }
            ]
        },
        "default_timeout": 60000,
        "NasMaxCount": {
            "type": "int32",
            "min": 1,
            "max": 8
        },
        "over_write": {
            "type": "string",
            "items": [
                "Off",
                "Auto",
                "1Day",
                "3Days",
                "7Days",
                "14Days",
                "30Days",
                "90Days"
            ]
        },
        "hdd_format_type": {
            "type": "string",
            "items": [
                "AllHddData",
                "OnlyHddRecord",
                "OnlyHddData"
            ]
        },
        "support_format": {
            "type": "bool"
        }
    }
}

Error Code

See Response Messages Body and Common error_code for more information.